# -*- coding: utf-8 -*-
# @Author  : pony.guan
# @Time    : 2021/12/15 16:00
# Description:

import json
import requests

url = 'http://172.20.8.7:26647/container/add'
headers = {
    "Content-Type": "application/json",
}
lst = []
for i in range(1, 10001):
    containerCode = 'A' + '0' * (9 - len(str(i))) + str(i)
    lst.append({
        "containerCode": containerCode,
        "containerTypeCode": "CT_KUBOT_STANDARD"
    })
    if i % 50 == 0:
        data = {
            "containerAdds": lst
        }

        r = requests.post(url=url, data=json.dumps(data), headers=headers)
        lst = []
